package com.josephxu.tank;

import java.io.IOException;
import java.util.Properties;

/**
 * @Author: Joseph Xu
 * @Date: 2022/1/23 21:37
 */
public class PropertyMgr {
    static Properties properties = new Properties(System.getProperties());

    static {
        try {
            properties.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static Object get(String key){
        if (properties == null) return null;
        return properties.get(key);

    }

    public static void main(String[] args) {
        System.out.println(get("initTankCount"));
    }




}
